<html> 
<head> 
<title> </title>
<style> 
px {font-family: "Lucida Console", Monaco }
p { font-size:100%; line-height:1.1em; }
body {xfont-style: sans-serif}
body {
color:#333; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:1em; line-height:1.3em; }
a:visited { color:#666; }
h1,h2,h3,h4,h5,h6 { color:#333; font-family:georgia, verdana, sans-serif; }
h1 { font-size:150%; page-break-before:auto;background-color: #aaaaff}
h2 { font-size:143%;color:teal; }
h3 { font-size:134%;color:blue; }
h4 { font-size:120%;color:gray; }
img { max-width: 55em}
p{ padding: 0;margin:0; }
p{ padding-right:1.4em; }
p{ padding-bottom:0.1em; }
p{ padding-top:1em; }
p{ whitespace: pre-wrap; }
h5,h6 { font-size:100% }
a.nav,a:link.nav, a:visited.nav { background-color:#FFF; color:#000; }
XXtable { border:double #000; border-collapse:collapse; }
XXtable { border-collapse:collapse; }
XXtd { border:thin solid #888; }
XXtd { border:none; }
li { margin-bottom:0.5em; }
blockquote { display:block; font-size:100%; line-height:1.1em; margin:0 0 0.5em; padding:0 2.5em; }
pre { background-color:#DDD; font-size:100%; overflow:auto; padding:1em; }
a,li span { color:#000; }
a:hover, a.nav:hover, a:hover math { background-color:#000; color:#FFF; }
#Container { margin:0 10px; text-align:center; background-color: #BBB}
#Content { border-top:none; margin:auto; padding:0.3em; text-align:left; width:100%; max-width:55em; background:#FFF}
span.webName { font-size:.5em; }
textarea#content { font-size: 1em; line-height: 1.125; }
h1#pageName { line-height:1em; margin:0.2em 0 0.2em 0; padding:0; }
.property { color:#666; font-size:100%; }
a.existingWikiWord[title]{ //border: 1px dashed #BBB; }
.byline { color:#666; font-size:1.0em; font-style:italic; margin-bottom:1em; padding-top:1px; } 
</style> 
</head>
<BODY bgcolor=#F0F0F0 text=#000000 link=#0000ff vlink=#C000C0 alink=#ff0000><A NAME=top></A>
<h5><a href="https://github.com/urbanjost/M_strings">[UP]</a></h5>
<div id="Container">
<div id="Content">
<CENTER>
<H1><HR><I>Manual Reference Pages &nbsp;-&nbsp;</I><NOBR>fortran_name (3m_strings)</NOBR><HR></H1>
</CENTER>
<A name=0>

     <H3>NAME</H3>

</A>
<BLOCKQUOTE>
<B>fortran_name</B>(3f) - [M_strings:COMPARE] test if string meets criteria
for being a fortran name
<P>
</BLOCKQUOTE>
<A name=contents></A><H3>CONTENTS</H3></A>
<BLOCKQUOTE>
<A HREF=#1>Synopsis</A><BR>
<A HREF=#2>Description</A><BR>
<A HREF=#3>Options</A><BR>
<A HREF=#4>Returns</A><BR>
<A HREF=#5>Example</A><BR>
</BLOCKQUOTE>
<A name=6>

     <H3>SYNOPSIS</H3>

</A>
<BLOCKQUOTE>
<P>
<B>elemental</B> <I>function</I> <B>fortran_name</B>(line) <I>result</I> (<I>(lout)</I>)
<P>
<PRE>
     character(len=*),intent(in)  :: line
     logical                      :: lout
<P>
</PRE>
</BLOCKQUOTE>
<A name=2>

     <H3>DESCRIPTION</H3>

</A>
<BLOCKQUOTE>
Determines if a string is an allowed Fortran name. To pass the input
string must be composed of 1 to 63 ASCII characters and start with a
letter and be composed entirely of alphanumeric characters [a-zA-Z0-9]
and underscores.
</BLOCKQUOTE>
<A name=3>

     <H3>OPTIONS</H3>

</A>
<BLOCKQUOTE>
<TABLE cellpadding=3>
<TR valign=top><TD width=6% nowrap>
<B>LINE</B> </TD><TD valign=bottom>
input string to test. Leading spaces are significant but
trailing spaces are ignored.
</TD></TR>
<TR></TR></TABLE></BLOCKQUOTE>
<A name=4>

     <H3>RETURNS</H3>

</A>
<BLOCKQUOTE>
<TABLE cellpadding=3>
<TR valign=top><TD width=6% nowrap>
<B>LOUT</B> </TD><TD valign=bottom>
a logical value indicating if the input string passed or failed
the test to see if it is a valid Fortran name or not.
</TD></TR>
<TR></TR></TABLE></BLOCKQUOTE>
<A name=5>

     <H3>EXAMPLE</H3>

</A>
<BLOCKQUOTE>
Sample program
<P>
<PRE>
     program demo_fortran_name
     use M_strings, only : fortran_name
     implicit none
     character(len=20),parameter :: names(*)=[character(len=20) ::  &
      & &#146;_name&#146;,         &#146;long_variable_name&#146;, &#146;name_&#146;,         &
      & &#146;12L&#146;,           &#146;a__b__c  &#146;,          &#146;PropertyOfGas&#146;, &
      & &#146;3%3&#146;,           &#146;$NAME&#146;,              &#146; &#146;,             &
      & &#146;Variable-name&#146;, &#146;A&#146;,                  &#146;x@x&#146; ]
     integer :: i
        write(*,&#146;(i3,1x,a20,1x,l1)&#146;)&
        & (i,names(i),fortran_name(names(i)),i=1,size(names))
     end program demo_fortran_name
<P>
</PRE>
Results:
<BLOCKQUOTE>
<TABLE cellpadding=3><!-- tsb: Results:
 -->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>1 _name</B> <!-- Consumed .TP -->
<BR>
<B>2 long_variable_name</B> <!-- Consumed .TP -->
<BR>
<B>3 name_</B> <!-- Consumed .TP -->
<BR>
<B>4 12L</B> <!-- Consumed .TP -->
<BR>
<B>5 a__b__c</B> <!-- Consumed .TP -->
<BR>
<B>6 PropertyOfGas</B> <!-- Consumed .TP -->
<BR>
<B>7 3%3</B> <!-- Consumed .TP -->
<BR>
<B>8 $NAME</B> <!-- Consumed .TP -->
<BR>
<B>9</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
</TD></TR>
<TR></TR></TABLE></BLOCKQUOTE>
<TABLE cellpadding=3>
<TR valign=top><TD colspan=2>
<B>10 Variable-name</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
<TABLE width=100% cellpadding=3>
<TR valign=top><TD width=6% nowrap>
<B>11 A</B> <!-- Consumed .TP -->
<BR>
<B>12 x@x</B> </TD><TD valign=bottom>
</TD></TR>
<TR></TR></TABLE></TD></TR>
<TR></TR></TABLE></BLOCKQUOTE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Nemo Release 3.1</I></TD> <TD width=33% align=center>fortran_name (3m_strings)</TD> <TD align=right width=33%><I>April 30, 2022</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by <A HREF="http://www.squarebox.co.uk/download/manServer.shtml">manServer 1.08</A> from 845f4ded-b3d0-4735-86e1-2c70611770ff using man macros.</FONT>
<br><br><center><img src="images/fortran_name.gif"></center>
</div>
</div>
</body>
</HTML>
